/**
 *	Rastertek Tutorial DirectX 11
 */

#include "DebugConsole.h"

#include "systemclass.h"

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow) {
	SystemClass* System;
	bool result;

#ifdef MYAPP_DEBUG_TRACE
	DebugConsole::Run();
#endif

	// create system object

	System = new SystemClass;
	if (!System)
		return 0;

	// initialize and run system object
	result = System->Initialize();
	if (result)
		System->Run();

	// shutdown and release system object
	System->Shutdown();
	delete System;
	System = 0;

	return 0;
}